<?
    $cnt = count($popular);
    if ($cnt > 4)
        $cnt = 4;
?>
<div class="recentlybooked topdestinations" style="width: auto; margin-left: 0">
    <ul class="recentlyBooked">
        <? for ($i = 0; $i < $cnt; $i++): ?>
                <li>
                    <?
                    $href = lang_url('search?dest_hot=' . $popular[$i]->name . '&preview=1').lcu()
                    ?>
                    <? $thumbnail = HOST_URL_HOTELS . 'destinations/' . $popular[$i]->photo_path . '/thumb_70x70/' . $popular[$i]->photo_name; ?>
                    <? $thumbnail_preview = HOST_URL_HOTELS . 'destinations/' . $popular[$i]->photo_path . '/thumb_300x178/' . $popular[$i]->photo_name; ?>
                    <a href="<?= $href ?>" class="clearfix HoverImg" data-id="<?= $thumbnail_preview ?>" title="<?= $popular[$i]->name ?>">
                        <div class="row">

                            <div class="span3">
                                <h3 class="ellipsis"><?= $popular[$i]->name ?></h3>
                                <p>
                                    <em><?= lang('nav.hotels'); ?> - <?= $popular[$i]->hotels_count; ?></em>
                                    <em><?= lang('accommodations'); ?> - <?= ($popular[$i]->accommodations_count + $popular[$i]->hostels_count + $popular[$i]->authentic_count); ?></em>
                                </p>

                            </div>
                            <div class="span1"><img src="<?= $thumbnail ?>" alt="<?= $popular[$i]->photo_title ?>" class="img-rounded"  /></div>
                        </div>
                    </a>
                </li>
            <? endfor; ?> 
    </ul>
</div>
